﻿@model work_dynamic
@{
    HtmlString html = new HtmlString(@Model.html_content);
    string id = Html.ViewContext.RouteData.Values["id"].ToString();
    string image_urll = Url.Action("ShowSmall", "Photo", new {photo_type="Work", id = @Model.image_url });
    string image_url_large = Url.Action("ShowLarge", "Photo", new {photo_type="Work", id = @Model.image_url });
    string image2 = "";
    string image2_small = "";
    string image3 = "";
    string image3_small = "";

    if (Model.image_url2.IsNotNull())
    {
        image2_small = Url.Action("ShowSmall", "Photo", new { photo_type = "Work", id = @Model.image_url2 });
        image2 = Url.Action("ShowLarge", "Photo", new { photo_type = "Work", id = @Model.image_url2 }); 
    }
    if (Model.image_url3.IsNotNull())
    {
        image3_small = Url.Action("ShowSmall", "Photo", new { photo_type = "Work", id = @Model.image_url3 });
        image3 = Url.Action("ShowLarge", "Photo", new { photo_type = "Work", id = @Model.image_url3 });
    }
}
<div style="width:100%;text-align:center;padding-top:5px">
    <div style="text-align:center;width:800px;margin-left:auto;margin-right:auto">
        <h1 style="color:#2f8965">@Model.title</h1>
        <h2 style="color:black">@Model.title2</h2>
        <hr />
        
        发布日期：@Model.data_time 发布人:@Model.OPERATOR
        <br />
        <br />
        <div style="text-align:left;width:800px;table-layout:fixed;word-wrap: break-word; ">
           @html
        </div>
        <br />
        <br />
        <a href='@image_url_large' target='_blank'><img src='@image_urll' alt=""/></a>
        @if (image2.IsNotNull())
        { 
            <a href='@image2' target='_blank'><img src='@image2_small' alt=""/></a>
        }
        @if (image3.IsNotNull())
        { 
            <a href='@image3' target='_blank'><img src='@image3_small' alt=""/></a>
        }

        
    </div>
</div>